package com.atguigu.consumer.sao.fallback;

import com.atguigu.consumer.sao.UserSao;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author 郑启
 * @date 2021/05/18 15:44
 */
@Component
public class UserFallback implements UserSao {
	@Value("${spring.application.name: }")
	private String appName;

	@Override
	public String getProfile(String profile) {
		return appName + "-provider.user.getProfile 服务繁忙，请稍后再试";
	}

	@Override
	public String getTimeout() {
		return appName + "-provider.user.getTimeout 服务繁忙，请稍后再试";
	}

	@Override
	public String getDivide(int divisor) {
		return appName + "-provider.user.getDivide(" + divisor + ") 服务繁忙，请稍后再试";
	}

	@Override
	public String getConfigInfo() {
		return appName + "-provider.user.getConfigInfo 服务繁忙，请稍后再试";
	}
}
